public with Sharing class SYN_SOAController{

    @RemoteAction
    public static List<Booking__c> getBookings(String bStart,String bEnd, String btype, String res){
        Datetime s = datetime.valueOf(bStart);
        Datetime e = datetime.valueOf(bEnd);
        List<Booking__c> bList = new List<Booking__c>();
        List<Booking__c> bb = new List<Booking__c>();
        bb = [select Id,
                        name,
                        start__c, 
                        Resource__r.MaxDuration__c, 
                        Program__r.Name, 
                        UserIsOwner__c, 
                        end__c,StartDateTime__c, 
                        EndDateTime__c,
                        CreatedById,
                        CreatedBy.Name,
                        SOA_Booking_Status__c,
                        Booking_Name__c from Booking__c where Booking_Type__c =:'Schools on Air' and StartDateTime__c >=:s and EndDateTime__c <=:e];
            for(Booking__c b : bb){
               b.start__c = b.StartDateTime__c.format('MM-dd-yyyy HH:mm:ss','GMT+10:00');
               system.debug(b.start__c);
               b.end__c = b.EndDateTime__c.format('MM-dd-yyyy HH:mm:ss','GMT+10:00');
               system.debug(b.end__c);
               bList.add(b);
            }
            
            return bList;
    }

}